package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc PushThirdPartyMessagesDto
 * @使用场景
 */
@Data
public class PushThirdPartyMessagesDto extends BaseDto implements Serializable {

    /**
     * 消息ID
     */
    @ApiModelProperty("消息ID")
    private String messageId;

    /**
     * 消息内容
     */
    @ApiModelProperty("消息内容")
    private String messageContent;

    /**
     * 发送方角色 SYSTEM:第三方系统 USER:用户 ASSISTANT:助手
     */
    @ApiModelProperty("发送方角色")
    private String messageRole;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        PushThirdPartyMessagesDto that = (PushThirdPartyMessagesDto) o;
        return (
                messageId == that.messageId &&
                        messageContent == that.messageContent &&
                        messageRole == that.messageRole &&
                        operateTime == that.operateTime
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                messageId,
                messageContent,
                messageRole,
                operateTime
        );
    }

}
